# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=perl-net-dns-resolver-programmable
_realname=Net-DNS-Resolver-Programmable
pkgver=0.009
pkgrel=7
pkgdesc="A Net::DNS::Resolver descendant class for offline emulation of DNS"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://search.cpan.org/dist/${_realname}/"
depends=('perl-net-dns' 'perl')
makedepends=('perl-module-build')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/B/BI/BIGPRESH/${_realname}-${pkgver}.tar.gz)
sha512sums=('a9a239ff454ba186e2a00e578615d6b25075f4e1fde548893681c169d04571c1621b023ecd2ccbb95a8fff50d8b811c410212db31a1b78f2d62977a45e90a735')

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}" || return 1
}
